ShadowsocksX 更新 PAC 方法

更新方法

手动下载 gfwlist.txt, 转成 PAC 所用的 gfwlist.js 之后放到默认存放位置。

  1. 获取 gfwlist.txt, 最新地址 https://github.com/gfwlist/gfwlist:

    1
    $ wget https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt
  2. 安装 gfwlist2pac,注意这里需要 python 2.7 的环境,我这里使用 conda 切换到 python 2.7 的环境:

    1
    2
    $ source activate py27
    $ pip install gfwlist2pac
  3. 转换 PAC:

    1
    $ gfwlist2pac -i gfwlist.txt -f gfwlist.js -p "SOCKS5 127.0.0.1:1080;" --precise
    1. 拷贝新生成的 gfwlist.js 到 ShadowsocksX PAC 目录(macOS):
    1
    $ cp gfwlist.js ~/.ShadowsocksX/
0%